package com.xuecheng.media.infrastructure.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-08-31  13:42
 */
@Getter
@AllArgsConstructor
public enum MediaExtensionEnum {

    PNG("png"),
    JPG("jpg");

    private String type;

    public static boolean judgeImage(String extension) {
        return PNG.type.equals(extension) || JPG.type.equals(extension);
    }
}
